package com.wangxiang.shop.product.controller;

import com.wangxiang.common.utils.PageEntity;
import com.wangxiang.common.utils.R;
import com.wangxiang.shop.product.entity.ShopBaseEntity;
import com.wangxiang.shop.product.service.ShopThreeTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 三级分类
 */
@RestController
@RequestMapping("product/category")
public class CategoryController {
    @Autowired
    private ShopThreeTypeService shopThreeTypeService;


    @RequestMapping("/list")
    public R list(){
        List<ShopBaseEntity> category = shopThreeTypeService.category();
        return R.ok().put("category",category);
    }

}
